﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI.WebControls;
using Blazing.WebFacade.CmsExtensions;
using Blazing.BusinessObjects.Products;
using Blazing.BusinessObjects.Tagging;

namespace Blazing.WebFacade.Extension
{
    public class eCommerceAdminInterfaceController : IAdminInterfaceController
    {
        public TreeNodeCollection ExtrasMenu
        {
            get
            {
                TreeNodeCollection col = new TreeNodeCollection();

                col.Add(new TreeNode { Text = "Products", NavigateUrl = "~/protected/Extension/eCommerce/ManageProducts.aspx" });

                return col;

            }
        }

        public void InstallDefaultData()
        {
            Taxonomy taxonomy = new Taxonomy
            {
                Name = "Products",
                Slug = "products",
                TaxonomyType = TaxonomyType.Load(2)
            };
            taxonomy.Save();

            Taxonomy taxonomy2 = new Taxonomy
            {
                Name = "Categories",
                Slug = "categories",
                TaxonomyType = TaxonomyType.Load(2)
            };
            taxonomy2.Save();
        }
    }
}
